package com.hzlx.consumption.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 维护备件消耗记录（跟踪维护任务中的物料使用情况）对象 mes_maintenance_part_consumption
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
public class MesMaintenancePartConsumption extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 备件消耗记录ID（自增主键） */
    private Long consumptionId;

    /** 关联的维护任务ID */
    @Excel(name = "关联的维护任务ID")
    private Long maintenanceTaskId;

    /** 消耗的物料/备件ID */
    @Excel(name = "消耗的物料/备件ID")
    private Integer materialId;

    /** 物料批次号 */
    @Excel(name = "物料批次号")
    private String batchId;

    /** 实际消耗数量 */
    @Excel(name = "实际消耗数量")
    private BigDecimal consumedQuantity;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String unitOfMeasure;

    /** 消耗发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "消耗发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date consumptionTime;

    /** 操作执行人员ID */
    @Excel(name = "操作执行人员ID")
    private String consumedBy;

    /** 消耗备注说明 */
    @Excel(name = "消耗备注说明")
    private String notes;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setConsumptionId(Long consumptionId) 
    {
        this.consumptionId = consumptionId;
    }

    public Long getConsumptionId() 
    {
        return consumptionId;
    }

    public void setMaintenanceTaskId(Long maintenanceTaskId) 
    {
        this.maintenanceTaskId = maintenanceTaskId;
    }

    public Long getMaintenanceTaskId() 
    {
        return maintenanceTaskId;
    }

    public Integer getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Integer materialId) {
        this.materialId = materialId;
    }

    public void setBatchId(String batchId)
    {
        this.batchId = batchId;
    }

    public String getBatchId() 
    {
        return batchId;
    }

    public void setConsumedQuantity(BigDecimal consumedQuantity) 
    {
        this.consumedQuantity = consumedQuantity;
    }

    public BigDecimal getConsumedQuantity() 
    {
        return consumedQuantity;
    }

    public void setUnitOfMeasure(String unitOfMeasure) 
    {
        this.unitOfMeasure = unitOfMeasure;
    }

    public String getUnitOfMeasure() 
    {
        return unitOfMeasure;
    }

    public void setConsumptionTime(Date consumptionTime) 
    {
        this.consumptionTime = consumptionTime;
    }

    public Date getConsumptionTime() 
    {
        return consumptionTime;
    }

    public void setConsumedBy(String consumedBy) 
    {
        this.consumedBy = consumedBy;
    }

    public String getConsumedBy() 
    {
        return consumedBy;
    }

    public void setNotes(String notes) 
    {
        this.notes = notes;
    }

    public String getNotes() 
    {
        return notes;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("consumptionId", getConsumptionId())
            .append("maintenanceTaskId", getMaintenanceTaskId())
            .append("materialId", getMaterialId())
            .append("batchId", getBatchId())
            .append("consumedQuantity", getConsumedQuantity())
            .append("unitOfMeasure", getUnitOfMeasure())
            .append("consumptionTime", getConsumptionTime())
            .append("consumedBy", getConsumedBy())
            .append("notes", getNotes())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
